<%@ page contentType="text/html; charset=utf-8" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html lang="zh">
<head>
	<title>后台管理 - 爱购物-商城</title>
	<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/static/css/style.css"/>
</head>
<body>
<c:import url="/static/page/manager-header-nav.jsp">
	<c:param name="nav" value="product"/>
</c:import>
<div id="position" class="wrap">
	您现在的位置：<a href="${pageContext.request.contextPath}/index">爱购物-商城</a> &gt; 管理后台 &gt; 修改分类
</div>
<div id="main" class="wrap clearfix">
	<c:import url="/static/page/manage-left-nav.jsp"/>
	<div class="main">
		<h2>添加分类</h2>
		<div class="manage">
			<form action="" method="post">
				<table class="form">
					<tr>
						<td class="field"><label for="parentId">父分类：</label></td>
						<td>
							<select name="parentId" id="parentId">
								<option value="0">顶级分类</option>
								<c:forEach var="c" items="${categories}" >
									<%-- 修改父分类不能修改为自生 --%>
									<c:if test="${productCategory.id ne c.id}">
										<option value="${c.id }" <c:if test="${productCategory.parentId eq c.id}">selected</c:if>>${c.name }</option>
									</c:if>
								</c:forEach>
							</select>
						</td>
					</tr>
					<tr>
						<td class="field"><label for="name">分类名称：</label></td>
						<td><input id="name" type="text" class="text" name="name" value="${productCategory.name}"/></td>
					</tr>
					<tr>
						<td>&nbsp;</td>
						<td><label class="ui-blue"><input type="submit" name="submit" value="提交" /></label></td>
					</tr>
				</table>
			</form>
		</div>
	</div>
</div>
<c:import url="/static/page/footer.jsp"/>
</body>
</html>
